package com.product.magina.webserviceclient.controller;

import com.magina.common.response.Response;
import com.product.magina.webserviceclient.service.WsClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/testWebService")
public class WebServiceTestController {

    @Autowired
    private WsClientService wsClientService;

    @GetMapping("/getMsg")
    public Response getData(){
        Object result = wsClientService.getMsg();
        return Response.succeed(result);

    }
    @GetMapping("/saveMsg")
    public Response test(){
        Object result = wsClientService.saveMsg();
        return Response.succeed(result);
    }
}
